<%@page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<c:if test="${product!=null}">
	<c:set var="operat" value="update" scope="page"/>
</c:if>
<c:if test="${product==null}">
	<c:set var="operat" value="insert" scope="page"/>
</c:if>
<div class="pageContent">
	<form:form modelAttribute="product"   action="${ctx}/product/${operat}?navtabid=productNav"  method="post"   onsubmit="return validateCallback(this, dialogAjaxDone);">
	<div class="pageFormContent" layoutH="58">
			<input type="hidden" id="id" name="id" value="${product.id}"/>
			<p>
				<label>name:</label>
				<input name="name"   type="text"  value="${product.name}"/>
			</p>
			<p>
				<label>number:</label>
				<input name="number"   type="text"  value="${product.number}"/>
			</p>
			<p>
				<label>description:</label>
				<input name="description"   type="text"  value="${product.description}"/>
			</p>
			<p>
				<label>price:</label>
				<input name="price"   type="text"  value="${product.price}"/>
			</p>
        <p>
            <label>类别名称:</label>
            <input name="productCategory.name"   type="text"  value="${product.productCategory.name}"/>
            <input name="productCategory.id" id="test" value="" type="hidden"/>
            <a class="btnLook" href="${ctx}/product/lookup" rel="lookup"  lookupGroup="productCategory" title="产品类别" width="400" >查找带回</a>
        </p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="reset">清空</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
			</ul>
		</div>
</form:form>
</div>
